import java.io.FileWriter;
import java.io.IOException;

public class day_06_IO_FileWriter_01 {
    public static void main(String[] args) throws IOException {
        /*
         * public FileWriter(File file) 创建字符输出流关联本地文件
         * public FileWriter(String pathname) 创建字符输出流关联本地文件
         * public FileWriter(File file,boolean append) 创建字符输出流关联本地文件，续写
         * public FileWriter(String pathname，boolean append) 创建字符输出流关联本地文件，续写
         */
        FileWriter fileWriter = new FileWriter("2.txt", true);

        String str = "王林林大傻逼";
        char[] chars = { 'a', 'b', 'c', '啊' };
        
        fileWriter.write(str);
        fileWriter.write(chars);

        fileWriter.close();
    }
}
